﻿using Cosmos.DataAccess.Trade.HighGate.Internals.Protocol;
using Cosmos.DataAccess.Trade.HighGate.v1;
using Cosmos.DataAccess.Trade.v1.Model;
using Cosmos.DataAccess.Trade.v1.Protocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cosmos.DataAccess.Trade.HighGate.Internals
{
    public class DataCenter
    {
        public DataCenter(DataSessionController dataSessionController)
        {
            _dataSessionController = dataSessionController;
        }

        public DataPushJob SubscribAppCommand()
        {
            return _dataSessionController?.SubScribe("upb_index_cosmos_quant_cosmos");
        }

        public DataPushJob SubscribWarningTip()
        {
            return _dataSessionController?.SubScribe("upb_cosmos_waring_tip");
        }

        public DataPushJob SubscribThirdModule(ISubscribeParameters subscriberParameters)
        {
            return _dataSessionController?.ThirdSubsribe(subscriberParameters).Result;
        }
        public IBaseLoginInfo GetBaseInfo()
        {
            return _dataSessionController?.GetBaseInfo();
        }

        public Task<IThirdQueryResult> ThirdRequest(IThirdQueryParameters parameters)
        {
            return _dataSessionController?.ThirdRequest(parameters);
        }

        private DataSessionController _dataSessionController { get; }
    }
}
